package com.yc.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yc.entities.BloodSugarRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.entities.custom.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author kuakha
 * @since 2021-04-07
 */
public interface BloodSugarRoleMapper extends BaseMapper<BloodSugarRole> {

    /**
     * 查询院长下的所有角色账号
     *
     * @param page                       分页
     * @param customRoleQueryRequestBean 请求参数
     * @return List<CustomRoleQueryResponseBean>
     */
    List<CustomRoleQueryResponseBean> getAllRoleInfo(Page<CustomRoleQueryRequestBean> page, @Param("customRoleQueryRequestBean") CustomRoleQueryRequestBean customRoleQueryRequestBean);


    /**
     * 根据Id查询当前的用户信息
     *
     * @param userId
     * @return Result
     */
    CustomRoleManageViewAndUpdateBean getRoleInfoById(@Param("userId") Integer userId
            , @Param("deanId") Integer deanId);

    List<CustomRoleManageViewAndUpdatePullDownResponseBean> getInfoFromUser(@Param("userId") Integer userId
            , @Param("deanId") Integer deanId
            , @Param("clientType") String clientType
            , @Param("account") String account
            , @Param("doctorName") String doctorName
            , @Param("isDisabled") String isDisabled
            , @Param("departmentId") String departmentId);

    List<CustomRoleManageViewAndUpdatePullDownResponseBean> getAllInfoFromDean(@Param("userId") Integer userId
            , @Param("deanId") Integer deanId
            , @Param("clientType") String clientType);


}
